package cn.pkg;


import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
@MapperScan("cn.pkg.mapper")
public class HelloApplcation {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(HelloApplcation.class);
    }
//    初始化一个客户端连接
//    @Bean
//    public Redisson redisson(){
////        单机模式
//        Config config = new Config();
//        config.useSingleServer().setAddress("redis://localhost:6379").setDatabase(0);
//        return (Redisson) Redisson.create(config);
//    }
}
